import request from '@/utils/request'

// 查询事先告知审批表列表
export function listPenaltyAdvanceNotice(query) {
  return request({
    url: '/ruoyi-system/penaltyadvancenotice/list',
    method: 'get',
    params: query,
  })
}

// 查询详细
export function getPenaltyAdvanceNotice(id) {
  return request({
    url: '/ruoyi-system/penaltyadvancenotice/' + id,
    method: 'get',
  })
}

// 新增审批
export function addPenaltyAdvanceNotice(data) {
  return request({
    url: '/ruoyi-system/penaltyadvancenotice',
    method: 'post',
    data: data,
  })
}

// 修改审批
export function updatePenaltyAdvanceNotice(data) {
  return request({
    url: '/ruoyi-system/penaltyadvancenotice',
    method: 'put',
    data: data,
  })
}

// 删除审批
export function delPenaltyAdvanceNotice(id) {
  return request({
    url: '/ruoyi-system/penaltyadvancenotice/' + id,
    method: 'delete',
  })
}

// 预览

export function previewPenaltyAdvanceNotice(params) {
  return request({
    url: '/ruoyi-system/penaltyadvancenotice/preview',
    method: 'get',
    params,
  })
}

// 详情页预览
export function previewPdf(data) {
  return request({
    url: '/ruoyi-system/penaltyadvancenotice/pdfPreview',
    method: 'post',
    data,
  })
}

// 保存附件
export function addPenaltyAdvanceNoticeFiles(data) {
  return request({
    url: '/ruoyi-system/penaltyadvancenotice/addFiles',
    method: 'post',
    data,
  })
}

// 导出
export function exportPenaltyAdvanceNotice(data) {
  return request({
    url: '/ruoyi-system/penaltyadvancenotice/export',
    method: 'post',
    data,
    responseType: 'blob',
  })
}

// 立案号下拉
export function getCaseList() {
  return request({
    url: '/ruoyi-system/penaltyadvancenotice/caseList',
    method: 'get',
  })
}

// 获取处罚决定书填的内容呢
export function getContent(id) {
  return request({
    url: '/ruoyi-system/penaltyadvancenotice/getContent?caseId=' + id,
    method: 'get',
  })
}

// 提交流程接口
export function submitPenaltyAdvanceNotice(data) {
  return request({
    url: '/ruoyi-system/penaltyadvancenotice/submit',
    method: 'post',
    data,
  })
}

// 审核接口
export function reviewPenaltyAdvanceNotice(data) {
  return request({
    url: '/ruoyi-system/penaltyadvancenotice/review',
    method: 'post',
    data,
  })
}

// 转办接口
export function transferPenaltyAdvanceNotice(data) {
  return request({
    url: '/ruoyi-system/penaltyadvancenotice/transferTask',
    method: 'post',
    data,
  })
}
